Ext.define('CMS.views.main.Main', {
    extend: 'Ext.tab.Panel',


    requires: [
        'Ext.plugin.Viewport',
        'Ext.window.MessageBox',

        'CMS.controllers.main.MainController',
        'CMS.views.main.totalBill.totalBill',
        'CMS.model.MainModel'
    ],

    xtype: 'Main',
    controller:'MainController',

    // controller: 'main',
     viewModel: 'main',
    plugins:'viewport',

    ui: 'navigation',

    tabBarHeaderPosition: 1,
    titleRotation: 0,
    tabRotation: 0,

    header: {
        layout: {
            align: 'stretchmax'
        },
        title: {
            bind: {
                text: 'CMS系统'
                /*text: '{name}'*/
            },
            flex: 0
        },
        iconCls: 'fa-th-list',
        items:[{
            xtype:'button',
            text:'注销',
            margin:'10 0',
            handler:'onClickButton'
        }]

    },

    tabBar: {
        flex: 1,
        layout: {
            align: 'stretch',
            overflowHandler: 'none'

        }
    },

    responsiveConfig: {
        tall: {
            headerPosition: 'top'
        },
        wide: {
            headerPosition: 'left'     //注释之后选择菜单移到顶部
        }
    },

    defaults: {
        bodyPadding: 20,
        tabConfig: {
            plugins: 'responsive',
            responsiveConfig: {
                wide: {
                    iconAlign: 'left',
                    textAlign: 'left'
                },
                tall: {
                    iconAlign: 'top',
                    textAlign: 'center',
                    width: 120
                }
            }
        }
    },

    items: [{
        title: '总账单',
        iconCls: 'fa-home',
        // The following grid shares a store with the classic version's grid as well!
         items: [{
             xtype: 'totalBill'
         }]
    }, {
        title: '单项查询',
        iconCls: 'fa-user',
        // bind: {
        //     html: '{loremIpsum}'
        // }
    }, {
        title: '费用预测和预警',
        iconCls: 'fa-users',
        // bind: {
        //     html: '{loremIpsum}'
        // }
    },
        {
            title: '费用预测和预警',
            iconCls: 'fa-users',
            // bind: {
            //     html: '{loremIpsum}'
            // }
        },
        {
        title: '设置',
        iconCls: 'fa-cog',
        // bind: {
        //     html: '{loremIpsum}'
        // }
    }]
});
